﻿using SqlSugar;

namespace PMIS.WebApi.Model
{
    [SugarTable("sys_menu", TableDescription = "菜单")]
    public class Menu: BaseModel
    {
        [SugarColumn(ColumnDescription = "ID", Length = 30, IsPrimaryKey = true)]
        public string Id { get; set; }

        [SugarColumn(ColumnDescription = "父id", IsNullable = true)]
        public string? ParentId { get; set; }

        [SugarColumn(ColumnDescription = "父菜单名称", IsIgnore = true)]
        public string ParentName { get; set; }

        [SugarColumn(ColumnDescription = "菜单名称")]
        public string Name { get; set; } = "";

        [SugarColumn(ColumnDescription = "菜单Icon", IsNullable = true)]
        public string Icon { get; set; } = "";

        [SugarColumn(ColumnDescription = "菜单url", IsNullable = true)]
        public string Url { get; set; } = "";

        [SugarColumn(ColumnDescription = "显示排序", IsNullable = true)]
        public int? Sort { get; set; }

        [SugarColumn(ColumnDescription = "菜单类型", IsNullable = true)]
        public int? Type { get; set; }

        [SugarColumn(ColumnDescription = "菜单状态", IsNullable = true)]
        public int? Status { get; set; } = 1;

        [SugarColumn(ColumnDescription = "权限标识", IsNullable = true)]
        public string AuthorizeCode { get; set; }

        [SugarColumn(ColumnDescription = "描述", IsNullable = true)]
        public string Remark { get; set; }
    }
}
